package com.wangfugui.mybatisplus.config;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @Author 513422479@qq.com
 * Date on 2020/10/11  10:15
 */
@Component
public class ObsConfig implements InitializingBean {

    @Value("${obs.file.endpoint}")
    private String file_endpoint;

    @Value("${obs.file.keyid}")
    private String file_keyid;

    @Value("${obs.file.keysecret}")
    private String file_keysecret;

    @Value("${obs.file.filehost}")
    private String file_filehost;

    @Value("${obs.file.bucketname1}")
    private String file_bucketname1;

    @Value("${obs.file.cdn}")
    private String cdn;


    public static String END_POINT         ;
    public static String ACCESS_KEY_ID     ;
    public static String ACCESS_KEY_SECRET ;
    public static String BUCKET_NAME1      ;
    public static String FILE_HOST         ;
    public static String CDN_HOST         ;

    @Override
    public void afterPropertiesSet() throws Exception {
        END_POINT = file_endpoint;
        ACCESS_KEY_ID = file_keyid;
        ACCESS_KEY_SECRET = file_keysecret;
        BUCKET_NAME1 = file_bucketname1;
        FILE_HOST = file_filehost;
        CDN_HOST = cdn;
    }

}
